package com.nuaa.shopping.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.nuaa.shopping.entity.User;
import com.nuaa.shopping.util.RowMapper;

public class UserMapper implements RowMapper<User> {

	@Override
	public User mapRow(ResultSet rs) throws SQLException {
		return new User(rs.getInt("id"), rs.getString("username"),
				rs.getString("password"), rs.getString("phone"),
				rs.getString("address"), rs.getInt("status"));
	}

}
